```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Redis数据结构详解 | 技术小馆</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3, h4 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 700;
            color: #111;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .card-hover {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }
        .type-icon {
            font-size: 2.5rem;
            color: #667eea;
        }
        .feature-badge {
            background-color: rgba(102, 126, 234, 0.1);
            color: #667eea;
        }
        .highlight-box {
            border-left: 4px solid #667eea;
            background-color: #f8fafc;
        }
        .footer-link:hover {
            color: #a3bffa;
        }
        .mermaid {
            background-color: #f8fafc;
            padding: 20px;
            border-radius: 8px;
            margin: 20px 0;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-4 md:px-0">
        <div class="container mx-auto max-w-6xl text-center">
            <h1 class="text-4xl md:text-5xl font-bold mb-6">Redis数据结构全解析</h1>
            <p class="text-xl md:text-2xl mb-8 max-w-3xl mx-auto">探索高性能内存数据库的核心数据类型与最佳实践</p>
            <div class="flex justify-center space-x-4">
                <a href="#overview" class="bg-white text-indigo-600 px-6 py-3 rounded-lg font-medium hover:bg-gray-100 transition duration-300">开始探索</a>
                <a href="#types" class="bg-indigo-700 text-white px-6 py-3 rounded-lg font-medium hover:bg-indigo-800 transition duration-300">数据类型</a>
            </div>
        </div>
    </section>

    <!-- Overview Section -->
    <section id="overview" class="py-16 px-4 md:px-0">
        <div class="container mx-auto max-w-6xl">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-1/2 mb-10 md:mb-0 md:pr-10">
                    <h2 class="text-3xl font-bold mb-6">Redis：现代开发的瑞士军刀</h2>
                    <p class="text-lg text-gray-700 mb-6">Redis作为一款高性能的内存数据库，已经成为现代开发中不可或缺的工具。无论是在缓存、消息队列、实时数据处理，还是在高并发和大数据场景下，Redis都展现了其卓越的性能和简洁的操作界面。</p>
                    <div class="highlight-box p-6 mb-6">
                        <p class="text-gray-700"><i class="fas fa-lightbulb text-yellow-500 mr-2"></i>要真正发挥Redis的优势，深入理解和灵活运用其数据结构至关重要。每种数据类型都有其独特的特点和适用场景，能够满足不同业务需求。</p>
                    </div>
                    <a href="#types" class="inline-flex items-center text-indigo-600 font-medium">
                        了解数据类型 <i class="fas fa-arrow-down ml-2"></i>
                    </a>
                </div>
                <div class="md:w-1/2">
                    <img src="https://cdn.nlark.com/yuque/0/2024/jpeg/21449790/1706434957932-ca1ca6f8-c593-4382-85e4-1c084a5a284b.jpeg" alt="Redis Overview" class="rounded-lg shadow-xl w-full">
                </div>
            </div>
        </div>
    </section>

    <!-- Data Types Section -->
    <section id="types" class="py-16 bg-gray-100 px-4 md:px-0">
        <div class="container mx-auto max-w-6xl">
            <h2 class="text-3xl font-bold mb-12 text-center">Redis的7种核心数据类型</h2>
            
            <!-- String -->
            <div id="string" class="bg-white rounded-xl shadow-md overflow-hidden mb-10 card-hover">
                <div class="p-8">
                    <div class="flex items-center mb-6">
                        <div class="type-icon mr-4">
                            <i class="fas fa-quote-right"></i>
                        </div>
                        <h3 class="text-2xl font-bold">String（字符串）</h3>
                    </div>
                    <div class="flex flex-col md:flex-row">
                        <div class="md:w-2/3 md:pr-8">
                            <p class="text-gray-700 mb-4">Redis的String类型是最简单、最基本的数据类型之一，它是一个键值对，键是一个唯一的字符串标识符，值则可以是任何形式的字符串。</p>
                            <div class="mb-6">
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">最大512MB</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">支持丰富操作</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">多种用途</span>
                            </div>
                            <div class="mb-6">
                                <h4 class="font-bold mb-2 text-lg">使用场景</h4>
                                <ul class="list-disc pl-5 text-gray-700">
                                    <li class="mb-1">缓存数据，加快数据读取速度</li>
                                    <li class="mb-1">计数器功能，如网站访问量统计</li>
                                    <li class="mb-1">分布式会话管理</li>
                                    <li class="mb-1">分布式锁的实现</li>
                                    <li>简单的消息队列功能</li>
                                </ul>
                            </div>
                            <div class="highlight-box p-4">
                                <h4 class="font-bold mb-2 text-lg">优化技巧</h4>
                                <p class="text-gray-700 mb-2"><i class="fas fa-check-circle text-green-500 mr-2"></i>使用MSET和MGET命令批量操作减少网络开销</p>
                                <p class="text-gray-700"><i class="fas fa-check-circle text-green-500 mr-2"></i>根据场景选择合适的数据结构避免内存浪费</p>
                            </div>
                        </div>
                        <div class="md:w-1/3 mt-6 md:mt-0">
                            <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1717678901929-ded08cd2-8732-4e7e-a5aa-0658c6e56929.png" alt="String Type" class="rounded-lg w-full">
                        </div>
                    </div>
                </div>
            </div>

            <!-- Hash -->
            <div id="hash" class="bg-white rounded-xl shadow-md overflow-hidden mb-10 card-hover">
                <div class="p-8">
                    <div class="flex items-center mb-6">
                        <div class="type-icon mr-4">
                            <i class="fas fa-layer-group"></i>
                        </div>
                        <h3 class="text-2xl font-bold">Hash（哈希）</h3>
                    </div>
                    <div class="flex flex-col md:flex-row">
                        <div class="md:w-2/3 md:pr-8">
                            <p class="text-gray-700 mb-4">Redis的Hash类型是一个键值对集合，适合存储对象的字段和值，其内部结构类似于Java中的HashMap，能够存储多个键值对。</p>
                            <div class="mb-6">
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">字段值存储</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">对象表示</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">高效操作</span>
                            </div>
                            <div class="mb-6">
                                <h4 class="font-bold mb-2 text-lg">使用场景</h4>
                                <ul class="list-disc pl-5 text-gray-700">
                                    <li class="mb-1">存储对象的各个字段，如用户信息</li>
                                    <li class="mb-1">系统配置存储</li>
                                    <li class="mb-1">统计信息存储</li>
                                    <li>消息属性存储</li>
                                </ul>
                            </div>
                            <div class="highlight-box p-4">
                                <h4 class="font-bold mb-2 text-lg">注意事项</h4>
                                <p class="text-gray-700 mb-2"><i class="fas fa-exclamation-triangle text-yellow-500 mr-2"></i>单个Hash对象大小不要超过Redis内存限制</p>
                                <p class="text-gray-700"><i class="fas fa-exclamation-triangle text-yellow-500 mr-2"></i>合理控制字段值的大小</p>
                            </div>
                        </div>
                        <div class="md:w-1/3 mt-6 md:mt-0">
                            <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1717678910530-6a11e86b-43d2-42bd-a425-c19a5dc20c34.png" alt="Hash Type" class="rounded-lg w-full">
                        </div>
                    </div>
                </div>
            </div>

            <!-- List -->
            <div id="list" class="bg-white rounded-xl shadow-md overflow-hidden mb-10 card-hover">
                <div class="p-8">
                    <div class="flex items-center mb-6">
                        <div class="type-icon mr-4">
                            <i class="fas fa-list-ol"></i>
                        </div>
                        <h3 class="text-2xl font-bold">List（列表）</h3>
                    </div>
                    <div class="flex flex-col md:flex-row">
                        <div class="md:w-2/3 md:pr-8">
                            <p class="text-gray-700 mb-4">Redis的List类型是一个双向链表，支持存储有序的字符串元素，每个元素都是一个字符串。可以通过头部和尾部两端操作，使其在实现队列和栈等数据结构时非常方便。</p>
                            <div class="mb-6">
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">双向链表</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">有序元素</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">队列/栈实现</span>
                            </div>
                            <div class="mb-6">
                                <h4 class="font-bold mb-2 text-lg">使用场景</h4>
                                <ul class="list-disc pl-5 text-gray-700">
                                    <li class="mb-1">消息队列实现</li>
                                    <li class="mb-1">栈结构实现</li>
                                    <li class="mb-1">异步任务处理</li>
                                    <li>实时聊天消息记录</li>
                                </ul>
                            </div>
                            <div class="highlight-box p-4">
                                <h4 class="font-bold mb-2 text-lg">优化建议</h4>
                                <p class="text-gray-700 mb-2"><i class="fas fa-check-circle text-green-500 mr-2"></i>使用批量操作减少网络开销</p>
                                <p class="text-gray-700"><i class="fas fa-check-circle text-green-500 mr-2"></i>合理设计数据结构避免性能问题</p>
                            </div>
                        </div>
                        <div class="md:w-1/3 mt-6 md:mt-0">
                            <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1717678923183-6b601c95-bb96-4072-83cb-7382aee99b5f.png" alt="List Type" class="rounded-lg w-full">
                        </div>
                    </div>
                </div>
            </div>

            <!-- Set -->
            <div id="set" class="bg-white rounded-xl shadow-md overflow-hidden mb-10 card-hover">
                <div class="p-8">
                    <div class="flex items-center mb-6">
                        <div class="type-icon mr-4">
                            <i class="fas fa-object-group"></i>
                        </div>
                        <h3 class="text-2xl font-bold">Set（集合）</h3>
                    </div>
                    <div class="flex flex-col md:flex-row">
                        <div class="md:w-2/3 md:pr-8">
                            <p class="text-gray-700 mb-4">Redis的Set类型是一个无序的字符串集合，它的主要特点是不允许重复的成员。Redis内部使用哈希表实现Set类型，确保了添加、删除、查找操作的高效性。</p>
                            <div class="mb-6">
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">无序集合</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">成员唯一</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">高效操作</span>
                            </div>
                            <div class="mb-6">
                                <h4 class="font-bold mb-2 text-lg">使用场景</h4>
                                <ul class="list-disc pl-5 text-gray-700">
                                    <li class="mb-1">标签管理系统</li>
                                    <li class="mb-1">好友关系存储</li>
                                    <li class="mb-1">数据去重操作</li>
                                    <li class="mb-1">用户兴趣爱好存储</li>
                                    <li>复杂集合运算</li>
                                </ul>
                            </div>
                            <div class="highlight-box p-4">
                                <h4 class="font-bold mb-2 text-lg">注意事项</h4>
                                <p class="text-gray-700 mb-2"><i class="fas fa-exclamation-triangle text-yellow-500 mr-2"></i>考虑集合大小对内存的影响</p>
                                <p class="text-gray-700"><i class="fas fa-exclamation-triangle text-yellow-500 mr-2"></i>合理控制成员长度</p>
                            </div>
                        </div>
                        <div class="md:w-1/3 mt-6 md:mt-0">
                            <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1717678931735-17e7f28b-f984-4f46-82ea-ccc145d1a82c.png" alt="Set Type" class="rounded-lg w-full">
                        </div>
                    </div>
                </div>
            </div>

            <!-- Sorted Set -->
            <div id="sorted-set" class="bg-white rounded-xl shadow-md overflow-hidden mb-10 card-hover">
                <div class="p-8">
                    <div class="flex items-center mb-6">
                        <div class="type-icon mr-4">
                            <i class="fas fa-sort-amount-down"></i>
                        </div>
                        <h3 class="text-2xl font-bold">Sorted Set（有序集合）</h3>
                    </div>
                    <div class="flex flex-col md:flex-row">
                        <div class="md:w-2/3 md:pr-8">
                            <p class="text-gray-700 mb-4">Redis的Sorted Set类型是一种有序的集合，每个成员都与一个浮点数值（称为分数）相关联。与普通集合不同的是，Sorted Set中的成员是唯一的，但分数可以重复。</p>
                            <div class="mb-6">
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">成员排序</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">分数关联</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">高效检索</span>
                            </div>
                            <div class="mb-6">
                                <h4 class="font-bold mb-2 text-lg">使用场景</h4>
                                <ul class="list-disc pl-5 text-gray-700">
                                    <li class="mb-1">排行榜系统实现</li>
                                    <li class="mb-1">带权重的任务调度</li>
                                    <li class="mb-1">时间轴数据存储</li>
                                    <li>数据统计与分析</li>
                                </ul>
                            </div>
                            <div class="highlight-box p-4">
                                <h4 class="font-bold mb-2 text-lg">优化建议</h4>
                                <p class="text-gray-700 mb-2"><i class="fas fa-check-circle text-green-500 mr-2"></i>使用批量化操作提高效率</p>
                                <p class="text-gray-700"><i class="fas fa-check-circle text-green-500 mr-2"></i>合理设计成员和分数的关系</p>
                            </div>
                        </div>
                        <div class="md:w-1/3 mt-6 md:mt-0">
                            <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1717678941206-44af22d3-b072-4d87-8a30-44ba13c60756.png" alt="Sorted Set Type" class="rounded-lg w-full">
                        </div>
                    </div>
                </div>
            </div>

            <!-- Bitmap -->
            <div id="bitmap" class="bg-white rounded-xl shadow-md overflow-hidden mb-10 card-hover">
                <div class="p-8">
                    <div class="flex items-center mb-6">
                        <div class="type-icon mr-4">
                            <i class="fas fa-border-style"></i>
                        </div>
                        <h3 class="text-2xl font-bold">Bitmap类型</h3>
                    </div>
                    <div class="flex flex-col md:flex-row">
                        <div class="md:w-2/3 md:pr-8">
                            <p class="text-gray-700 mb-4">Redis的Bitmap类型是一种位数组结构，用于高效地存储和操作大量的二进制数据。Bitmap在Redis中以字符串类型（String）的形式存储，每个位存储一个二进制值（0或1）。</p>
                            <div class="mb-6">
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">位存储</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">高效操作</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">节省内存</span>
                            </div>
                            <div class="mb-6">
                                <h4 class="font-bold mb-2 text-lg">应用场景</h4>
                                <ul class="list-disc pl-5 text-gray-700">
                                    <li class="mb-1">布尔型状态存储（如用户在线状态）</li>
                                    <li class="mb-1">快速计数（如用户行为统计）</li>
                                    <li>大规模数据去重（如IP访问统计）</li>
                                </ul>
                            </div>
                            <div class="mb-6">
                                <h4 class="font-bold mb-2 text-lg">关键特性</h4>
                                <ul class="list-disc pl-5 text-gray-700">
                                    <li class="mb-1">通过位存储数据，每个位可以是0或1</li>
                                    <li class="mb-1">底层通过字符串类型实现</li>
                                    <li>支持丰富的位操作命令</li>
                                </ul>
                            </div>
                        </div>
                        <div class="md:w-1/3 mt-6 md:mt-0">
                            <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1717682743141-ae67f007-fda4-4595-b3a3-80355ba5bc57.png" alt="Bitmap Type" class="rounded-lg w-full">
                        </div>
                    </div>
                </div>
            </div>

            <!-- HyperLogLog -->
            <div id="hyperloglog" class="bg-white rounded-xl shadow-md overflow-hidden mb-10 card-hover">
                <div class="p-8">
                    <div class="flex items-center mb-6">
                        <div class="type-icon mr-4">
                            <i class="fas fa-chart-pie"></i>
                        </div>
                        <h3 class="text-2xl font-bold">HyperLogLog类型</h3>
                    </div>
                    <div class="flex flex-col md:flex-row">
                        <div class="md:w-2/3 md:pr-8">
                            <p class="text-gray-700 mb-4">Redis的HyperLogLog（HLL）类型是一种基数估计算法，用于统计数据集合中的唯一元素数量，具有高效、节省内存的特性。通过牺牲一定的准确性来换取更小的内存消耗。</p>
                            <div class="mb-6">
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">基数估计</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">内存高效</span>
                                <span class="feature-badge inline-block px-3 py-1 rounded-full text-sm font-medium mr-2 mb-2">概率算法</span>
                            </div>
                            <div class="mb-6">
                                <h4 class="font-bold mb-2 text-lg">主要命令</h4>
                                <ul class="list-disc pl-5 text-gray-700">
                                    <li class="mb-1"><code class="bg-gray-100 px-2 py-1 rounded">PFADD</code> - 添加元素</li>
                                    <li class="mb-1"><code class="bg-gray-100 px-2 py-1 rounded">PFCOUNT</code> - 基数估计</li>
                                    <li><code class="bg-gray-100 px-2 py-1 rounded">PFMERGE</code> - 合并多个HLL</li>
                                </ul>
                            </div>
                            <div class="mb-6">
                                <h4 class="font-bold mb-2 text-lg">内部结构</h4>
                                <p class="text-gray-700">使用一组稀疏的程序计数器（registers）来估计唯一元素的数量。每个程序计数器记录观察到的最大前导零位数。</p>
                            </div>
                        </div>
                        <div class="md:w-1/3 mt-6 md:mt-0">
                            <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1717683046469-08bd5c57-4308-483a-80cb-e9b7cfe3dbf4.png" alt="HyperLogLog Type" class="rounded-lg w-full">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Visualization Section -->
    <section class="py-16 px-4 md:px-0">
        <div class="container mx-auto max-w-6xl">
            <h2 class="text-3xl font-bold mb-12 text-center">Redis数据结构全景视图</h2>
            
            <div class="grid md:grid-cols-2 gap-8 mb-12">
                <div>
                    <h3 class="text-2xl font-bold mb-6">五大类型结构对比</h3>
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1706436218248-e7916ebb-528f-44d3-87b7-dfb7b7a1ec82.png" alt="Redis Data Types" class="rounded-lg shadow-md w-full">
                </div>
                <div>
                    <h3 class="text-2xl font-bold mb-6">使用场景分析</h3>
                    <img src="https://cdn.nlark.com/yuque/0/2022/png/21449790/1660475562492-5d09c365-c42c-484f-afe8-b0b2fbbd17e1.png" alt="Redis Use Cases" class="rounded-lg shadow-md w-full">
                </div>
            </div>
            
            <div class="mb-12">
                <h3 class="text-2xl font-bold mb-6">五大类型底层实现</h3>
                <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1706434898138-3f9909a3-b4e4-4b4f-9f7f-274b7d106fdd.png" alt="Redis Underlying Implementation" class="rounded-lg shadow-md w-full">
            </div>
            
            <div class="text-center">
                <a href="https://www.yuque.com/jtostring/qiwsg9/ssgtq7l8o218u5qg" class="inline-block bg-indigo-600 text-white px-6 py-3 rounded-lg font-medium hover:bg-indigo-700 transition duration-300">
                    深入了解底层原理 <i class="fas fa-book-open ml-2"></i>
                </a>
            </div>
        </div>
    </section>

    <!-- Mermaid Diagram -->
    <section class="py-16 bg-gray-100 px-4 md:px-0">
        <div class="container mx-auto max-w-6xl">
            <h2 class="text-3xl font-bold mb-12 text-center">Redis数据结构关系图</h2>
            <div class="mermaid">
                graph TD
                    A[Redis数据结构] --> B[String]
                    A --> C[Hash]
                    A --> D[List]
                    A --> E[Set]
                    A --> F[Sorted Set]
                    A --> G[Bitmap]
                    A --> H[HyperLogLog]
                    
                    B --> I[缓存]
                    B --> J[计数器]
                    B --> K[分布式锁]
                    
                    C --> L[对象存储]
                    C --> M[配置信息]
                    
                    D --> N[消息队列]
                    D --> O[栈结构]
                    
                    E --> P[标签系统]
                    E --> Q[好友关系]
                    
                    F --> R[排行榜]
                    F --> S[优先级队列]
                    
                    G --> T[状态存储]
                    G --> U[位操作]
                    
                    H --> V[基数统计]
                    H --> W[大数据去重]
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer class="bg-gray-900 text-white py-12 px-4 md:px-0">
        <div class="container mx-auto max-w-6xl text-center">
            <div class="mb-6">
                <h3 class="text-xl font-bold mb-2">技术小馆</h3>
                <p class="text-gray-400">探索技术之美，分享知识之光</p>
            </div>
            <div>
                <a href="http://www.yuque.com/jtostring" class="footer-link text-gray-300 hover:text-white transition duration-300">
                    <i class="fas fa-globe mr-2"></i> http://www.yuque.com/jtostring
                </a>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
        
        // 平滑滚动
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });
    </script>
</body>
</html>
```